package org.afun.csms_android;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.widget.ImageView;

import java.io.File;

public class MyActivity extends AppCompatActivity {

    private ImageView iv;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        iv = new ImageView(MyActivity.this);

        setContentView(iv);
        Intent intent = getIntent();
        String path = intent.getStringExtra("path");
        if (path != null) {
            iv.setImageURI(Uri.fromFile(new File(path)));
        }
    }
}